import QtQuick 2.0
import "Constants.js" as Constants
import "Utility.js" as Utils

//Cell element for use as background tile in battle map.

Item{
    id:root
    property int index:0
    property int tilesCol: 3
    property int tilesRow: 3
    property alias source: img.source
    width:Constants.cellSize
    height:Constants.cellSize
    clip: true

    Image{
        id:img
        x:-((index % tilesCol) *Constants.cellSize)
        y:-(Math.floor(index / tilesRow)*Constants.cellSize)
    }
}
